/* 
 * File:   VerticalTableHandler.h
 * Author: Guilherme Monteiro
 *
 */

#ifndef VERTICALTABLEHANDLER_H
#define	VERTICALTABLEHANDLER_H

#include <cv.h>
#include <highgui.h>
#include <cxcore.h>
#include <exception>
#include <cerrno>

#include "NullImageException.h"
#include "ImageRotor.h"
#include "RotationCorrector.h"
#include "PathValidator.h"

using namespace std;

/**
 * Class that represents a handler
 * to manipulate images with tables
 * rotated in 90 degrees.
 * 
 * @param lowImagePath
 */
class VerticalTableHandler {
public:
    VerticalTableHandler(string lowImagePath, string highImagePath) throw (NullImageException);
    VerticalTableHandler(const VerticalTableHandler& orig);
    virtual ~VerticalTableHandler();
    vector<string> rotateImageInNinetyDegrees() throw (NullImageException);
private:
    string originalLowImagePath;
    string originalHighImagePath;
    
    string createNewRotatedPath(string path);
    
    void setLowImagePath(string lowImagePath) throw (NullImageException);
    void setHighImagePath(string highImagePath) throw (NullImageException);
};

#endif	/* VERTICALTABLEHANDLER_H */

